"""
@name : 2.python线程的基本使用
@author : wenyao
@projectname: sanchuanglianxi
"""
#普通方法实现
import requests
import time
from dec import cost

def get_content(url):
    text = requests.get(url).content
    time.sleep(0.5)
    print("get content")

@cost
def main():
    urls = ["https://www.baidu.com/",
            "https://www.baidu.com/",
            "https://www.baidu.com/",
            "https://www.baidu.com/",
            "https://www.baidu.com/",
            "https://www.baidu.com/"]
    for url in urls:
        get_content(url)

if __name__ == "__main__":
    main()